export const useDictStore = defineStore(
    'dict',
    () => {
      const dictMap = ref<DictMapRecord>({});

      /** 获取字典 */
      function getDict(dictType: string): DictItemRecord[] {
        let dictItemList = dictMap.value[dictType];
        return dictItemList;
      }

      /** 设置字典 */
      function setDict(dictType: string, dictDataList: DictItemRecord[]) {
        dictMap.value[dictType] = dictDataList;
      }

      /** 清空字典 */
      function cleanDict() {
        dictMap.value = {};
      }

      return {
        getDict,
        setDict,
        cleanDict,
      }
    }
)